Strengthened Lazy Heaps: Surpassing the Lower Bounds for Binary Heaps

نویسندگان

  • Stefan Edelkamp
  • Jyrki Katajainen
  • Amr Elmasry
چکیده

Let n denote the number of elements currently in a data structure. An in-place heap is stored in the first n locations of an array, uses O(1) extra space, and supports the operations: minimum , insert , and extract -min. We introduce an in-place heap, for which minimum and insert take O(1) worst-case time, and extract -min takes O(lg n) worst-case time and involves at most lg n+O(1) element comparisons. The achieved bounds are optimal to within additive constant terms for the number of element comparisons. In particular, these bounds for both insert and extract -min—and the time bound for insert—surpass the corresponding lower bounds known for binary heaps, though our data structure is similar. In a binary heap, when viewed as a nearly complete binary tree, every node other than the root obeys the heap property, i.e. the element at a node is not smaller than that at its parent. To surpass the lower bound for extract -min, we reinforce a stronger property at the bottom levels of the heap that the element at any right child is not smaller than that at its left sibling. To surpass the lower bound for insert , we buffer insertions and allow O(lg n) nodes to violate heap order in relation to their parents.

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

منابع مشابه

Heap building bounds

We have considered the uppper and lower bounds for building heaps in the worst and average cases. Heaps are binary tree for which all its levels are full except the last one. The nodes on the last level are all as much to the left as possible. A max-heap has the property that every node has value greater or equal to that of its children. We have studied the contruction of heaps in the compariso...

متن کامل

Pairing heaps with O(log log n) decrease cost

We give a variation of the pairing heaps for which the time bounds for all the operations match the lower bound proved by Fredman for a family of similar self-adjusting heaps. Namely, our heap structure requires O(1) for insert and findmin, O(log n) for delete-min, and O(log logn) for decreasekey and meld (all the bounds are in the amortized sense except for find-min).

متن کامل

Smooth heaps and a dual view of self-adjusting data structures

We present a new connection between self-adjusting binary search trees (BSTs) and heaps, two fundamental, extensively studied, and practically relevant families of data structures (Allen, Munro, 1978; Sleator, Tarjan, 1983; Fredman, Sedgewick, Sleator, Tarjan, 1986; Wilber, 1989; Fredman, 1999; Iacono, Özkan, 2014). Roughly speaking, we map an arbitrary heap algorithm within a broad and natural...

متن کامل

Improved Upper Bounds for Pairing Heaps

Pairing heaps are shown to have constant amortized time Insert and Meld, thus showing that pairing heaps have the same amortized runtimes as Fibonacci heaps for all operations but Decrease-Key.

متن کامل

A Tight Lower Bound for Top-Down Skew Heaps

Previously, it was shown in a paper by Kaldewaij and Schoenmakers that for topdown skew heaps the amortized number of comparisons required for meld and delmin is upper bounded by logφ n, where n is the total size of the inputs to these operations and φ = ( √ 5+1)/2 denotes the golden ratio. In this paper we present worst-case sequences of operations on top-down skew heaps in which each applicat...

متن کامل

ذخیره در منابع من


  با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

عنوان ژورنال:
  • CoRR

دوره abs/1407.3377  شماره 

صفحات  -

تاریخ انتشار 2014